<?php

//防止恶意调用
if (!defined('IN_MOD'))
{
    die('Hacking attempt');
}

// 前后台公用配置程序
if(file_exists(MODULEPARA_PATH.'/configmodule/config'.$configinfo['installmodule'].'.php'))
{
	require(MODULEPARA_PATH.'/configmodule/config'.$configinfo['installmodule'].'.php');	
}
if(file_exists(MODULEPARA_PATH.'/expmodule/common/expconfig'.$configinfo['installmodule'].'.php'))
{
	require(MODULEPARA_PATH.'/expmodule/common/expconfig'.$configinfo['installmodule'].'.php');	
}

// pc mobile xcx配置程序
if($configinfo['modulepara'] == "pc" || $configinfo['modulepara'] == "mobile" || $configinfo['modulepara'] == "xcx")
{
	if(file_exists(MODULEPARA_PATH.'/configmodule/configmodule/config'.$configinfo['installmodule'].'.php'))
	{
		require(MODULEPARA_PATH.'/configmodule/configmodule/config'.$configinfo['installmodule'].'.php');
	}
	if(file_exists(MODULEPARA_PATH.'/expmodule/exp'.$configinfo['installmodule'].'.php'))
	{
		require(MODULEPARA_PATH.'/expmodule/exp'.$configinfo['installmodule'].'.php');
	}
	// 会员配置程序
	if($configmember)
	{
		if(file_exists(MODULEPARA_PATH.'/configmodule/configmember/config'.$configinfo['installmodule'].'.php'))
		{
			require(MODULEPARA_PATH.'/configmodule/configmember/config'.$configinfo['installmodule'].'.php');
		}
		if(file_exists(MODULEPARA_PATH.'/expmodule/member/exp'.$configinfo['installmodule'].'.php'))
		{
			require(MODULEPARA_PATH.'/expmodule/member/exp'.$configinfo['installmodule'].'.php');
		}
	}
	if(file_exists(MODULEPARA_PATH.'/configmodule/configmodule/config'.$configinfo['installmodule'].'_rear.php'))
	{
		require(MODULEPARA_PATH.'/configmodule/configmodule/config'.$configinfo['installmodule'].'_rear.php');
	}
	if(file_exists(MODULEPARA_PATH.'/expmodule/exp'.$configinfo['installmodule'].'_rear.php'))
	{
		require(MODULEPARA_PATH.'/expmodule/exp'.$configinfo['installmodule'].'_rear.php');
	}
}

// 后台配置程序
if($configinfo['modulepara'] == "admin")
{
	if(file_exists(MODULEPARA_PATH.'/configmodule/configmodulepara/config'.$configinfo['installmodule'].'.php'))
	{
		require(MODULEPARA_PATH.'/configmodule/configmodulepara/config'.$configinfo['installmodule'].'.php');
	}
	if(file_exists(MODULEPARA_PATH.'/expmodule/admin/exp'.$configinfo['installmodule'].'.php'))
	{
		require(MODULEPARA_PATH.'/expmodule/admin/exp'.$configinfo['installmodule'].'.php');
	}
}

// 商家后台配置程序
if($configinfo['modulepara'] == "supplier" || $configinfo['suppliermodule'] == 1 || $configinfo['adminsuppliermodule'] == 1)
{
	if(file_exists(MODULEPARA_PATH.'/configmodule/configsupplier/config'.$configinfo['installmodule'].'.php'))
	{
		require(MODULEPARA_PATH.'/configmodule/configsupplier/config'.$configinfo['installmodule'].'.php');
	}
	if(file_exists(MODULEPARA_PATH.'/expmodule/supplier/exp'.$configinfo['installmodule'].'.php'))
	{
		require(MODULEPARA_PATH.'/expmodule/supplier/exp'.$configinfo['installmodule'].'.php');
	}
}
?>